package deep6jvmdvm;

/*
初始化类变量
 */
public class ClassInitTest {
    public static int value = 1;
    public static void main(String[] args) {
        ClassInitTest.value = 2;
        ClassInitTest ci = new ClassInitTest();
    }

    // 静态语句块在初始化阶段执行
    static {
        System.out.println("ClassInit stack block! ");

    }

    //非静态语句块只在创建对象实例时被执行
    {
        System.out.println("ClassInit non-stack block! ");

    }
}
